"""
Hongyu (Vicky) Ye 
03/13/2021
Section #03
Part#3: Prime Number Finder

"""


while True:
    start = int(input("Start number: "))
    if (start > 0):
        break
    else:
        print("Start and end must be positive")

while True:
    end = int(input("End number: "))
    if(end > start):
        break
    elif (end > 0):
        print("End number must be greater than start number")
    else:
        print("Start and end must be positive")

counter = 0
x=len(str(end))+1
for i in range (start, end + 1):
    flag = 1
    for number in range(2, (i//2+1)):
        if(i % number == 0):
            flag = 0

    if flag and i > 1:
        print(format(str(i), ">"+str(x)+"s"), end="")
        counter += 1
        if counter % 10 == 0:
            print ()




    
    

